package com.oursnail.repository;

import com.oursnail.domain.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Collection;
import java.util.List;

/**
 * @Author 【swg】.
 * @Date 2017/12/14 14:27
 * @DESC
 * @CONTACT 317758022@qq.com
 */
public interface UserRepository extends JpaRepository<User,Long> {
    Page<User> findByNameLike(String name, Pageable pageable);

    User findByUsername(String username);

    List<User> findByUsernameIn(Collection<String> usernames);
}
